-- GENERATED SPELL FOR [Underking Talonox] --


function spell0_30830(pUnit, Event) --@Blinding Swarm,Self--
pUnit:FullCastSpellOnTarget(50284,pUnit)
pUnit:RegisterEvent('Sorts_30830', 5000, 1)
end

function spell1_30830(pUnit, Event) --@Mandible Crush,Self--
pUnit:FullCastSpellOnTarget(60802,pUnit)
pUnit:RegisterEvent('Sorts_30830', 540, 1)
end

function Sorts_30830(pUnit, Event)
local choix_sorts_30830 = math.random(0, 1)
if choix_sorts_30830 == 0 then
pUnit:RegisterEvent('spell0_30830', 1, 1)
end
if choix_sorts_30830 == 1 then
pUnit:RegisterEvent('spell1_30830', 1, 1)
end
end

function mob30830_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30830', math.random(1500, 3000), 1)
end

function mob30830_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30830_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30830_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30830, 1, 'mob30830_Action')
RegisterUnitEvent(30830, 2, 'mob30830_Leave')
RegisterUnitEvent(30830, 3, 'mob30830_Kill')
RegisterUnitEvent(30830, 4, 'mob30830_Die')
